package com.example.housingRentalSystem.utils;

/**
 * @author 王硕
 * @version jdk21
 * @className HttpStatus
 * @description
 * @date 2025/3/6 9:04
 */
public enum HttpStatus {
    OK(200, "成功"),
    BAD_REQUEST(400, "请求错误"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "找不到资源"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误");

    private final int code;
    private final String message;

    HttpStatus(int code, String message) {
        this.code = code;
        this.message = message;
    }
    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
